Most organizations have some business processes that facilitate their business. Examples of business processes are the process for vacation approval, where an employee requests a vacation and the request goes through an approval process and then is rejected or approved. Another example is some sales process, where some purchase order is received and priced and items shipped and fulfilled, an invoice sent and payment received. These business processes are critical to the functionality of the organization. There exist industry standards to capture these business processes and to draw them. These are generally termed Business Process Diagrams (BPD). Two standards are Business Process Modeling Notation (BPMN) and Business Process Execution language (BPEL).
There are some differences in BPMN and BPEL. One difference is that BPEL has standard programming constructs like if-then-else or while or switch, and falls into the category of block structured languages because there are well defined blocks in the business diagram. BPMN, on the other hand, offers more flexibility and does not always follow block structures, the diagrams are more unstructured and graph like. For example, in BPEL all the branches of a switch would join back together, while in BPMN one of the branches may end in a terminate event. BPMN falls into the category of flow structured languages.
BPEL provides a formal mechanism for the definition of business processes. BPEL is optimized for the operation and/or interoperation of business process modeling (BPD) systems. But BPEL is ill-suited for use by many business analysts. While useful for programming a computer, from the point of view of a business analyst, sets of BPEL statements may appear to organize a complex business process into complex, disjointed, unintuitive formats that are understandable by computers but perhaps not so understandable by business analysts, managers, and so on. These analysts, managers, and so on may be more comfortable with flowcharts associated with BPMN. Thus, BPMN provides a BPD designed for humans and provides a formal mapping to a BPEL.
BPMN is a new standard and many organizations have investments in BPEL engines. Thus, it may be desirable to convert BPMN processes to BPEL processes. The conversion may be desired because a human (e.g., business analyst) may prefer to interact with a BPMN while a computer may be programmed using BPEL. But this is inherently challenging to convert a flow language to block language. If the BPMN process is not very unstructured and is balanced, then existing algorithms that are defined as part of the BPMN standard can help in the conversion to BPEL. A component analysis is done on BPMN processes and structures (e.g., while, switch) are identified and corresponding BPEL structures are generated. This uses a token flow algorithm. Token analysis includes creating and tracking tokens through different execution paths to discover the boundaries of well-structured components.